package com.xxx.common.enums;


import com.xxx.common.enums.base.BaseEnum;

/**
 * Date: 2015-11-02
 * Time: 上午11:03
 *
 * @author Silenter Wat
 * @version 1.0
 */
public enum StatusEnum implements BaseEnum {


    NORMAL(1, "正常"),
	DELETE(0, "删除");


    private final int value;

    private final String description;


    StatusEnum(int value, String description) {
        this.value = value;
        this.description = description;
    }


    public static StatusEnum valueOf(Integer value) {
        for (StatusEnum item : values()) {
            if (item.getValue() .equals(value)) {
                return item;
            }
        }
        return null;
    }


    @Override
    public Integer getValue() {
        return value;
    }

    @Override
    public String getDescription() {
        return description;
    }

    public StatusEnum get(Integer value) {
        return StatusEnum.valueOf(value);
    }


    @Override
    public String toString() {
        return String.valueOf(this.value);
    }

}
